package com.allwees.bs.module.lms.rest;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.allwees.bs.core.model.constant.CacheName;
import com.allwees.bs.core.modelbase.vo.R;
import com.allwees.bs.module.core.rest.BoCrudApi;
import com.allwees.bs.module.lms.entity.Logistics;
import com.allwees.bs.module.lms.req.query.LogisticQueryReq;
import com.allwees.bs.module.lms.service.LogisticService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 *
 * @author yangylsky
 * @since 2019-12-04
 *
 */
@RestController
@RequestMapping("/backstage/api/lms/logistic")
public class LogisticApi extends BoCrudApi<Logistics, LogisticService> {
	@GetMapping("page")
	public R page(Page<Logistics> page, LogisticQueryReq req) {
		return super.page(page, req);
	}

	@Cacheable(cacheNames = CacheName.LOGIST_PROVIDER,key = "'list'")
	@GetMapping("list")
	public R list(LogisticQueryReq req) {
		return super.list(req);
	}
}
